package com.yifushidai.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "控电记录")
public class PowerEntity {

    @ApiModelProperty(value = "自动编号")
    private Long id;

    @ApiModelProperty(value = "联网mac")
    private String mac;

    @ApiModelProperty(value = "控电结果(0=断电,1=通电)")
    private Integer typ;

    @ApiModelProperty(value = "控电类型")
    private String saveType;

    @ApiModelProperty(value = "节电量(小时)")
    private Double saveHour;

    @ApiModelProperty(value = "控电时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date powerTime;

    @ApiModelProperty(value = "周")
    private String week;

    @ApiModelProperty(value = "月")
    private String month;

    @ApiModelProperty(value = "季度")
    private String quarter;

    @ApiModelProperty(value = "年")
    private String year;
}